/**
 * Copyright 2004 Cordys R&D B.V. 
 * 
 * This file is part of the Cordys FTP Connector. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
 package com.eibus.applicationconnector.ftp;

import java.io.IOException;
import java.net.SocketException;
import java.util.List;

/**
 * Interface between Cordys FTP Client and external FTP Clients
 * Has the common methods with FTP protocols supports
 */
public interface IFTPClient
{
	/* Enum to hold the file_type - ASCII or BINARY */
	static enum FILE_TYPE
	{
		ASCII, BINARY
	};
	
	public String append(String sourceFile, String targetFile) throws FTPException;

	public void connect(FTPConfiguration ftpConfiguration) throws SocketException, IOException, FTPException;
	
	public String createDirectory(String path) throws FTPException;
	
	public String delete(String path) throws FTPException;
	
	public int deleteFiles(String path) throws FTPException;
	
	public void disconnect();
	
	public String download(String sourceFile, String targetFile) throws FTPException;
	
	public String getListOfFiles(String path, List<String> fileList)  throws FTPException;
	
	public String getListOfFilesWithDetails(String path, List<CordysFTPFile> cordysFTPFileList) throws FTPException;
	
	public int listDirectories(int directoryPathNode) throws FTPException;
	
	public String upload(String sourceFile, String targetFile) throws FTPException;
	
	public String rename(String from, String to) throws FTPException;
	
	public String removeDirectory(String directoryPath) throws FTPException;
	
	public String printWorkingDirectory();
	
	public void setFileType(FILE_TYPE filetype);
}